(Qasas) 28 : 22
وَلَمَّا تَوَجَّهَ تِلْقَاءَ مَدْيَنَ قَالَ عَسَىٰ رَبِّي أَنْ يَهْدِيَنِي سَوَاءَ السَّبِيلِ

And when he directed himself towards Midian, he said: "Perhaps my Lord will guide me to the Straightpath".

See explanation 18: 10 and 24.